package com.wswy.wzcx.model.core;


import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.gson.annotations.SerializedName;

public class BgWorkModel implements android.os.Parcelable {

  @SerializedName("id")
  public int id;

  @SerializedName("weight")
  public int weight=100;

  @SerializedName("url")
  public String url;

  @SerializedName("scriptUrl")
  public String scriptId;

  //脚本内容
  @SerializedName("script")
  public String scriptContent;


  @Override
  public int describeContents() {
    return 0;
  }

  @Override
  public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(this.id);
    dest.writeInt(this.weight);
    dest.writeString(this.url);
    dest.writeString(this.scriptId);
    dest.writeString(this.scriptContent);
  }

  public BgWorkModel() {
  }

  protected BgWorkModel(Parcel in) {
    this.id = in.readInt();
    this.weight = in.readInt();
    this.url = in.readString();
    this.scriptId = in.readString();
    this.scriptContent = in.readString();
  }

  public static final Creator<BgWorkModel> CREATOR = new Creator<BgWorkModel>() {
    @Override
    public BgWorkModel createFromParcel(Parcel source) {
      return new BgWorkModel(source);
    }

    @Override
    public BgWorkModel[] newArray(int size) {
      return new BgWorkModel[size];
    }
  };


  @Override
  public String toString() {
    return "BgWorkModel{" +
        "id=" + id +
        ", weight=" + weight +
        ", url='" + url + '\'' +
        ", scriptId='" + scriptId + '\'' +
        ", scriptContent='" + scriptContent + '\'' +
        '}';
  }
}
